package com.powersystem.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.powersystem.demo.entity.PsSystemconfig;
import com.powersystem.demo.mapper.PsSystemconfigMapper;
import com.powersystem.demo.service.IPsSystemconfigService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author linrongji
 * @since 2019-11-14
 */
@Service
public class PsSystemconfigServiceImpl extends ServiceImpl<PsSystemconfigMapper, PsSystemconfig> implements IPsSystemconfigService {
    @Autowired
    private PsSystemconfigMapper PsSystemconfigMapper;

    public IPage<PsSystemconfig> selectPageVo(String configCode, int page){
        Page<PsSystemconfig> pages = new Page<>(page, 5);
        return  PsSystemconfigMapper.selectPage(pages, new QueryWrapper<PsSystemconfig>()
                .like("configCode", configCode));
    }
}
